import {createStore, designPage} from "@peryl/react-compose";
import {PageCard, PageCardContent, Tab, TabGroup} from "plain-design";
import {BuildDifyDbToolsParams} from "../tools-page/BuildDifyDbToolsParams";
import {env} from "../../env";

export default designPage(() => {

  const currentTab = createStore({
    initialState: undefined as undefined | string,
    getCacheConfig: () => ({
      cacheName: 'tools-page-tabs',
      envName: env.envName,
    })
  });

  return () => (
    <PageCard>
      <PageCardContent noPadding>
        <TabGroup v-model={currentTab.value}>
          <Tab title="构建dify_db_tools参数">
            <BuildDifyDbToolsParams/>
          </Tab>
        </TabGroup>
      </PageCardContent>
    </PageCard>
  );
});
